package com.it.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: CaoYouGen
 * @DateTime: 2023/11/09/10:21
 * @注释: TODO
 **/
@Controller
@Slf4j
@RequestMapping("/student")
public class StudentController {
    @GetMapping("/query")
    @PreAuthorize("hasAnyAuthority('student:query')")
    public String queryInfo(){
        return "user/query";
    }
    
    @GetMapping("/add")
    @PreAuthorize("hasAnyAuthority('student:add')")
    public String addInfo(){
        return "user/add";
    }
    
    @GetMapping("/update")
    @PreAuthorize("hasAnyAuthority('student:update')")
    public String updateInfo(){
        return "user/update";
    }

    @GetMapping("/delete")
    @PreAuthorize("hasAnyAuthority('student:delete')")
    public String deleteInfo(){
        return "user/delete";
    }
    
    @GetMapping("/export")
    @PreAuthorize("hasAnyAuthority('student:export')")
    public String exportInfo(){
        return "user/export";
    }
}
